package annotation.define.database.bean;

import annotation.define.database.Constraints;
import annotation.define.database.MyTable;
import annotation.define.database.SqlInteger;
import annotation.define.database.SqlString;

/**
 * 测试MyTable注解
 *
 * @author sun.ye
 * @since 2020-05-11 17:04
 */
@MyTable(name = "MEMBER")
public class Member {
    @SqlString(30)
    String firstName;

    @SqlString(50)
    String lastName;

    @SqlInteger
    Integer age;

    @SqlString(value = 30,constraints = @Constraints(primaryKey = true))
    String handle;

    static int memberCount;

    public String getFirstName() {
        return firstName;
    }

    public String getLastName() {
        return lastName;
    }

    public Integer getAge() {
        return age;
    }

    public String getHandle() {
        return handle;
    }

    @Override
    public String toString() {
        return handle;
    }
}